﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace FX.CC.Andon.Service
{
    public static class ReaderHelper
    {
        public static T GetValue<T>(IDataReader reader, string field) {
            var obj = reader[field];
            return obj is DBNull ? default(T) : (T)obj; 
        }
    }
}
